<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title>우편번호 검색</title>
<%-- <link rel="stylesheet" href="/${initParam.context_root}/css/type/type4/reset.css" type="text/css"> --%>
<script src="/${initParam.context_root}/js/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
	$(function(){
		$("select").attr("size","5");
		/* $("#insert").click(function(e){
			e.preventDefault();
			var str = $("select option:selected").attr("value");
			var strArray = str.split(",");
			
			alert(addr);
			alert(post1);
			alert(post2);
			
			$("#cPost1", opener.document).val(strArray[0]);
			$("#cPost2", opener.document).val(strArray[1]);
			$("#cLoc1", opener.document).val(strArray[2]);
			$("#cLoc2", opener.document).val("상세주소를 입력하세요.");

			self.close();
		});

		$("#cancle").click(function(e){
			e.preventDefault();
			window.close();
		}); */
	});

</script>
</head>
<body>
<div id="popHeader">
    <h3>우편번호 검색</h3>
</div>

<div id="popBody">

		<p>
			찾고자하는 지역의 <b>"동 이름"</b>을 입력해주십시오.<br /> 예 : 서울시 강남구 역삼동인 경우 "역삼동"을
			입력해 주시면 됩니다.
		</p>
		<form id="fo_insert" method="post">
			<c:choose><c:when test="${not empty list}">
			<div id="zone_address_list">
				<c:if test="${fn:length(list) == 0 }">
					잘못된 주소입니다.
				</c:if>
				<c:if test="${fn:length(list) != 0 }">
				<select name="_tmp_address_list">
					<option >주소를 선택하세요</option>
				<c:forEach var="temp" items="${list}" varStatus="status">
					<option value="${temp[0]},${temp[1]},${temp[3]}"><c:out value="${temp[2]}" /></option>
				</c:forEach>
				</select>
				<button class="btn" id="insert">등 록</button> &nbsp;&nbsp;
				<button class="btn" id="cancle">취 소</button>
				</c:if>
			</div>
			</c:when></c:choose>
			<div id="zone_address_search">
				<input type="text" name="str" class="in"/>
				<button class="btn" id="search">검색</button><br />
			</div>
			
			<input type="hidden" id="post" name="post" value="" />
			<input type="hidden" id="addr" name="addr" value="" />
		</form>

	</div>
</body>
</html>